Global Replace
A user must have (or be a member of a group that has) the daReplace
permission in order to use the Global Replace tool. If a user does not have permission to use the tool, the Replace option will not be enabled on the Edit tab of the Ribbon.
The Global Replace tool permits authorized users to replace a value in one or more fields in a set of records. It can be used, for example, to:
- Correct the spelling of a term in all fields in a module, e.g. baner with banner.
- Change the case of the value in a field, e.g. UPPERCASE with Title case.
- Standardize formatting, e.g. remove spaces between letters in an acronym, e.g. A G M with AGM.
- Replace an attached record with another record.
- Remove a blank row in a multi-value field (e.g. a table).
- Change the status of a record.
In this documentation the replacement of one value with another is called a substitution. When a substitution is defined it is saved in the Replace box:
Note: A substitution is only saved during the current session. When you log out of EMu, all substitutions are removed from the Replace box.
The Replace box works differently to other dialogue boxes: every substitution displaying in the Replace box will be run when Replace or Replace All is clicked. It is not possible to select just one substitution from the list to run. In the example above, even though the Role substitution is highlighted, both substitutions listed will be run.
Tip: Before running a Global Replace, be sure that you have removed substitutions that are no longer required.
- Search for or retrieve a group of records that need to be changed.
- Select Replace on the Edit tab of the Ribbon to display the Replace box.
The Replace box lists substitutions defined during the current session.
- If necessary, define a new substitution
How to define a new substitution
- In the Replace box, click New to display the Substitution box:
- From the Field drop list select the field that contains the value to be replaced.
The field type (e.g. Date, Text, Integer) automatically displays in the Type field.
- In the Text to find field enter the text to be replaced.
Note:
^$
is a useful wildcard for locating empty fields in a Global Replace. If you wish to use wildcards, select the Regular Expression checkbox (placing a tick in it).Depending on the field selected in the Field drop list, the Text to find field will include a drop list and / or Lookup List. Use these to select the value to be replaced, or enter the text into the field.
Note: If the field is a date field, the format of the date must conform to EMu date formats.
- In the Replace with field enter the replacement text.
- If required, select one or more of the Options:
Option
Description
Case Sensitive
Use if the text to find and replace is case sensitive, e.g. use to find records that include the term Brown but not brown.
Whole words only
Use to replace whole words only. If you wanted to replace environment with, say, context you would use this option in order that environmental isn't changed to contextal.
First occurrence only
Use to replace only the first occurrence of the search term in the field, e.g. use to add a description following an acronym but only to the first occurrence of the acronym.
Remove blank rows
Use to remove empty rows in a table (see How to remove rows from a table).
Regular expression
Use to find text using one or more wildcards or regular expressions (see Wildcards in a Global Replace).
- Click OK.
The newly defined substitution is added to the Replace box.
- Click Replace to perform the substitution within the current The record currently displayed in Details View or highlighted in List View (there is a faint dotted line around it). It is only possible to have one current record at a time. record or selected A selected record is one that has been chosen either on its own or to as part of a group of records. It is usual to select the records you want to be affected by an operation before performing the operation. Selected records are used in many instances, e.g. when a number of records are to be: discarded, saved in a group, or attached to another record. A selected record displays on screen with a blue background when in List View. records only
-OR-
Click Replace All to perform the substitution within all records currently displaying (e.g. returned by your search or retrieved from a group).
It is possible to abort a Global Replace while it is under way, but note the following: records are saved AS they are modified. Thus all records processed before an abort will have been changed.
The Replace box indicates how many records have been changed at the time of an abort:
- Search for or retrieve a group of records that need to be changed.
- Select Replace on the Edit tab of the Ribbon to display the Replace box.
The Replace box lists any substitutions defined for the current session (i.e. since you logged into EMu).
- Select the substitution to edit and then click Properties
-OR-
Right-click the substitution and select Properties from the menu that displays.
The fields in the Replace box display the values previously defined for this substitution:
- Make your changes to the substitution and click OK.
Note: Details about working with the Global Replace tool in a multi-language environment can be found here.